Repository navigation
Conversation
- Timeline hook: resolve equipment names in one query per itemtype and the ticket update right once, instead of 6 to 12 queries per request. - Timeline template: emit the approve/refuse script once, with a delegated click handler, instead of one module script per waiting request. - ReservableItems: load the assets of each itemtype in one query instead of one getFromDB() per reservable item. - ConfigManager: keep the plugin configuration in memory (1 query per request instead of 14, 56 in the form editor), reloaded by init() and cleared when a configuration value of the plugin is saved. - setup.php: drop the redundant isActivated() check in plugin init.
GLPI now throws an access denied exception in ajax/common.tabs.php instead of returning an empty tab (glpi-project/glpi#26257).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist before requesting a review
Description
Removes per-item SQL queries and caches the plugin configuration, no behaviour or schema change.
ReservableItems: assets loaded in one query per itemtype.isActivated()removed from plugin init.Benchmark
GLPI 11.0.13, 50 000 reservation requests, one ticket with 1 250 of them, 1 980 reservable items.
ReservableItemsserver time)S1 still takes about 10 s to display fully: the remaining cost is core rendering the 1 250 timeline entries.
Tests
New tests for the grouped name lookup, the single timeline script and the config cache.
9 errors in the full suite are unrelated (8 need an LDAP server,
ConfigFormTest::testTabContentIsEmptyForTechalready fails on11.0/bugfixes).